package com.kfm.wiki.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kfm.wiki.entity.Content;
import com.kfm.wiki.mapper.DocMapper;
import com.kfm.wiki.service.ContentService;
import com.kfm.wiki.mapper.ContentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
* @author 10854
* @description 针对表【content(文档内容)】的数据库操作Service实现
* @createDate 2022-10-19 15:14:31
*/
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content>
    implements ContentService{

    @Autowired
    private DocMapper docMapper;

    @Override
    public Content getById(Serializable id) {
        docMapper.increaseViewCount((Long)id);
        return super.getById(id);
    }
}




